<?php
class User {
	var $uid;
	var $username;
	function islogin()
	{
		require_once FCPATH.'./config.inc.php';
        require_once FCPATH.'./uc_client/client.php';
		if(!empty($_COOKIE['game_auth'])) {
			list($this->uid, $this->username) = explode("\t", uc_authcode($_COOKIE['game_auth'], 'DECODE'));
		} else {
			$this->uid = $this->username = '';
		}
	}
	
	function get_uid(){return $this->uid;}

	function get_username(){return $this->username;}
}